package com.wxb.mapper;

import com.wxb.domain.MallCartEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Date 2025-05-28 14:21
 * @Version 1.0
 * @Description
 * @ClassName IMallCartMapper
 **/
public interface MallCartMapper {

    int save(MallCartEntity t);

    void save(Map<String, Object> map);

    void saveBatch(List<MallCartEntity> list);

    int update(MallCartEntity t);

    int update(Map<String, Object> map);

    int delete(Object id);

    int delete(Map<String, Object> map);

    int deleteBatch(Object[] id);

    MallCartEntity queryObject(Object id);

    List<MallCartEntity> queryList(Map<String, Object> map);

    List<MallCartEntity> queryList(Object id);

    int queryTotal(Map<String, Object> map);

    int queryTotal();
    void updateCheck(@Param("productIds") String[] productIds,
                     @Param("isChecked") Integer isChecked, @Param("userId") Long userId);

    void deleteByProductIds(@Param("productIds") String[] productIds);

    void deleteByUserAndProductIds(@Param("userId") Long userId,@Param("productIds") String[] productIds);

    void deleteByCart(@Param("userId") Long userId, @Param("sessionId") Integer sessionId, @Param("checked") Integer checked);
}
